<?php
require_once("classes/DBUtils.class.php");
$sql = "ALTER TABLE recipe_units ADD unit_system INT";
$ingredients = $DB_LINK->Execute($sql);
$sql = "ALTER TABLE recipe_units ADD unit_order INT";
$ingredients = $DB_LINK->Execute($sql);
$sql = "UPDATE recipe_units SET unit_system = 0 where unit_id < 11";
$ingredients = $DB_LINK->Execute($sql);
$sql = "UPDATE recipe_units SET unit_system = 1 where unit_id > 10 AND unit_id < 19";
$ingredients = $DB_LINK->Execute($sql);
$sql = "UPDATE recipe_units SET unit_system = 2 where unit_id > 18";
$ingredients = $DB_LINK->Execute($sql);
$sql = "UPDATE recipe_units SET unit_order = unit_id";
$ingredients = $DB_LINK->Execute($sql);
?>
